<div class="header">
    <div class="main">
        <!--<a class="logo" href="__ROOT__/" title="Fly">Fly社区</a>-->
        <div class="logo" onclick="window.location.href='__ROOT__/'" style="cursor: pointer">
            {frag mark='logo'}
        </div>
        <div class="nav">
            <a {empty name="top_category_info.class_id"}class="nav-this"{/empty} href="__ROOT__/"><i class="iconfont icon-wenda"></i>首页</a>
            {catlist name="vo"}
            <a href="{$vo.curl}" {eq name="top_category_info.class_id" value="$vo.class_id"}class="nav-this"{/eq}><i class="iconfont icon-ui"></i>{$vo.name}</a>
            {/catlist}
            <a {eq name=":input('name')" value="guestbook"}class="nav-this"{/eq} href="{:url('form/index',array('name'=>'guestbook'))}"><i class="iconfont icon-wenda"></i>留言板</a>
        </div>

        <div class="nav-user">
            {empty name='Think.session.home_user.user_id'}
            <!-- 未登入状态 -->
            <a class="unlogin" href="{:url('index/login')}"><i class="iconfont icon-touxiang"></i></a>
            <span><a href="{:url('index/login')}">登入</a><a href="{:url('index/reg')}">注册</a></span>
            <p class="out-login">
                <a href="" onclick="layer.msg('正在通过QQ登入', {icon:16, shade: 0.1, time:0})" class="iconfont icon-qq" title="QQ登入"></a>
                <a href="" onclick="layer.msg('正在通过微博登入', {icon:16, shade: 0.1, time:0})" class="iconfont icon-weibo" title="微博登入"></a>
            </p>
            {else /}
            <!-- 登入后的状态 -->
            <a class="avatar" href="{:url('user/userhome')}">
              <img src="{$Think.session.home_user.head_url|default='__HOME__/default_img/default2.jpg'}">
              <cite>{$Think.session.home_user.nickname|default='未设置昵称'}</cite>
            </a>
            <div class="nav">
              <a href="{:url('user/userSet')}"><i class="iconfont icon-shezhi"></i>设置</a>
              <a href="{:url('index/loginOut')}"><i class="iconfont icon-tuichu" style="top: 0; font-size: 22px;"></i>退了</a>
            </div>
            {/empty}
        </div>
    </div>
</div>